class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: E = None
        self.y: D = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: H = None
        self.p: B = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: H = None
        self.x: F = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: D = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: E = None
        self.x: B = None
        self.p: G = None
        self.z: I = None
        self.y: H = None
        self.o: B = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: I = None
        self.y: I = None
        self.q: C = None
        self.z: I = None
        self.o: D = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: G = None
        self.y: I = None
        self.u: F = None
        self.s: H = None
        self.q: A = None
        self.r: G = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: H = None
        self.v: A = None
        self.u: D = None
        self.o: B = None
        self.t: C = None
        self.txt = txt

m = A("m")
j = B("j")
c = C("c")
a = D("a")
i = E("i")
b = F("b")
g = G("g")
d = H("d")
l = I("l")
h = H("h")

m.t = g
m.z = i
m.y = a
m.p = a
j.p = a
j.t = a
c.o = d
c.u = h
c.p = j
c.z = a
a.z = g
a.v = d
a.x = b
a.s = b
i.o = j
i.q = a
i.y = l
b.w = i
b.u = i
b.x = j
b.o = j
b.q = j
b.p = g
b.z = l
b.y = d
g.p = c
g.q = c
g.u = l
g.y = l
g.z = l
g.o = a
g.v = a
d.v = h
d.s = h
d.x = g
d.r = g
d.y = l
d.z = l
d.u = b
d.q = m
l.y = i
l.w = h
l.v = m
l.u = a
l.o = j
l.t = c
h.v = d
h.s = d
h.x = g
h.r = g
h.y = l
h.z = l
h.u = b
h.q = m
assert l.v.p.v.r.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: E = None
        self.y: D = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: H = None
        self.p: B = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: H = None
        self.x: F = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: D = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: E = None
        self.x: B = None
        self.p: G = None
        self.z: I = None
        self.y: H = None
        self.o: B = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: I = None
        self.y: I = None
        self.q: C = None
        self.z: I = None
        self.o: D = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: G = None
        self.y: I = None
        self.u: F = None
        self.s: H = None
        self.q: A = None
        self.r: G = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: H = None
        self.v: A = None
        self.u: D = None
        self.o: B = None
        self.t: C = None
        self.txt = txt

m = A("m")
j = B("j")
c = C("c")
a = D("a")
i = E("i")
b = F("b")
g = G("g")
d = H("d")
l = I("l")
h = H("h")

m.t = g
m.z = i
m.y = a
m.p = a
j.p = a
j.t = a
c.o = d
c.u = h
c.p = j
c.z = a
a.z = g
a.v = d
a.x = b
a.s = b
i.o = j
i.q = a
i.y = l
b.w = i
b.u = i
b.x = j
b.o = j
b.q = j
b.p = g
b.z = l
b.y = d
g.p = c
g.q = c
g.u = l
g.y = l
g.z = l
g.o = a
g.v = a
d.v = h
d.s = h
d.x = g
d.r = g
d.y = l
d.z = l
d.u = b
d.q = m
l.y = i
l.w = h
l.v = m
l.u = a
l.o = j
l.t = c
h.v = d
h.s = d
h.x = g
h.r = g
h.y = l
h.z = l
h.u = b
h.q = m
assert l.v.p.v.r.txt == "g"