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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: G = None
        self.x: E = None
        self.q: F = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: C = None
        self.u: A = None
        self.txt = txt

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

k.t = f
k.x = f
k.z = l
k.w = l
k.p = e
k.u = j
c.r = i
c.q = i
c.o = j
c.x = a
c.v = e
e.z = f
f.p = j
f.t = c
a.q = c
a.w = j
a.o = e
a.x = k
i.u = c
i.z = c
i.w = c
i.t = l
i.p = k
j.t = i
l.q = e
l.x = e
l.u = k
assert l.x.z.p.t.t.q.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: H = None
        self.w: H = None
        self.p: C = None
        self.x: D = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: G = None
        self.x: E = None
        self.q: F = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: C = None
        self.u: A = None
        self.txt = txt

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

k.t = f
k.x = f
k.z = l
k.w = l
k.p = e
k.u = j
c.r = i
c.q = i
c.o = j
c.x = a
c.v = e
e.z = f
f.p = j
f.t = c
a.q = c
a.w = j
a.o = e
a.x = k
i.u = c
i.z = c
i.w = c
i.t = l
i.p = k
j.t = i
l.q = e
l.x = e
l.u = k
assert l.x.z.p.t.t.q.z.t.txt == "c"