class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: J = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: F = None
        self.p: A = None
        self.q: B = None
        self.y: B = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: B = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: G = None
        self.r: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: J = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: F = None
        self.p: A = None
        self.q: B = None
        self.y: B = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: B = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: G = None
        self.r: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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