class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: F = None
        self.t: G = None
        self.y: H = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: D = None
        self.v: D = None
        self.w: H = None
        self.y: D = None
        self.p: C = None
        self.t: H = None
        self.z: G = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: H = None
        self.y: B = None
        self.v: J = None
        self.w: A = None
        self.z: E = None
        self.o: E = None
        self.p: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: A = None
        self.w: D = None
        self.y: H = None
        self.p: B = None
        self.v: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: E = None
        self.x: H = None
        self.z: F = None
        self.p: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: D = None
        self.v: D = None
        self.w: H = None
        self.y: D = None
        self.p: C = None
        self.t: H = None
        self.z: G = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: H = None
        self.y: B = None
        self.v: J = None
        self.w: A = None
        self.z: E = None
        self.o: E = None
        self.p: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: A = None
        self.w: D = None
        self.y: H = None
        self.p: B = None
        self.v: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: E = None
        self.x: H = None
        self.z: F = None
        self.p: J = None
        self.txt = txt

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

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

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