class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: D = None
        self.u: D = None
        self.s: D = None
        self.t: C = None
        self.p: E = None
        self.q: I = None
        self.x: D = None
        self.v: C = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: I = None
        self.q: D = None
        self.y: D = None
        self.u: D = None
        self.s: I = None
        self.v: I = None
        self.x: H = None
        self.t: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: B = None
        self.r: A = None
        self.o: H = None
        self.v: G = None
        self.q: B = None
        self.u: J = None
        self.z: A = None
        self.w: E = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: G = None
        self.x: I = None
        self.w: F = None
        self.r: C = None
        self.v: F = None
        self.q: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: A = None
        self.u: A = None
        self.x: I = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: E = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: J = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: G = None
        self.t: G = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: C = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: H = None
        self.r: D = None
        self.p: F = None
        self.z: F = None
        self.txt = txt

m = A("m")
d = B("d")
c = C("c")
j = D("j")
f = E("f")
i = F("i")
l = G("l")
n = H("n")
g = I("g")
k = J("k")

m.y = c
m.t = c
m.v = c
m.w = j
m.u = j
m.s = j
m.x = j
m.p = f
m.q = g
m.o = i
d.z = i
d.p = g
d.s = g
d.v = g
d.q = j
d.y = j
d.u = j
d.x = n
d.t = k
c.p = l
c.v = l
c.t = d
c.q = d
c.r = m
c.z = m
c.o = n
c.u = k
c.w = f
c.y = j
j.u = l
j.z = l
j.x = g
j.w = i
j.v = i
j.r = c
j.q = k
f.s = i
f.y = i
f.r = m
f.u = m
f.x = g
i.p = f
i.r = f
i.s = m
l.v = j
l.q = k
l.o = m
n.o = g
n.u = g
n.z = l
n.t = l
g.t = j
g.q = c
g.w = f
k.w = m
k.u = n
k.r = j
k.p = i
k.z = i
assert d.t.r.q.r.x.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: D = None
        self.u: D = None
        self.s: D = None
        self.t: C = None
        self.p: E = None
        self.q: I = None
        self.x: D = None
        self.v: C = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: I = None
        self.q: D = None
        self.y: D = None
        self.u: D = None
        self.s: I = None
        self.v: I = None
        self.x: H = None
        self.t: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: B = None
        self.r: A = None
        self.o: H = None
        self.v: G = None
        self.q: B = None
        self.u: J = None
        self.z: A = None
        self.w: E = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: G = None
        self.x: I = None
        self.w: F = None
        self.r: C = None
        self.v: F = None
        self.q: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: A = None
        self.u: A = None
        self.x: I = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: E = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: J = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: G = None
        self.t: G = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: C = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: H = None
        self.r: D = None
        self.p: F = None
        self.z: F = None
        self.txt = txt

m = A("m")
d = B("d")
c = C("c")
j = D("j")
f = E("f")
i = F("i")
l = G("l")
n = H("n")
g = I("g")
k = J("k")

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