class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: B = None
        self.q: D = None
        self.y: F = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: A = None
        self.u: F = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: C = None
        self.o: D = None
        self.q: C = None
        self.r: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: A = None
        self.v: E = None
        self.s: A = None
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: A = None
        self.u: F = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: C = None
        self.o: D = None
        self.q: C = None
        self.r: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: A = None
        self.v: E = None
        self.s: A = None
        self.x: A = None
        self.txt = txt

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

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