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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: D = None
        self.w: C = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: C = None
        self.q: C = None
        self.x: D = None
        self.w: D = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: D = None
        self.s: F = None
        self.txt = txt

e = A("e")
l = B("l")
h = C("h")
c = D("c")
g = E("g")
k = F("k")
j = D("j")
d = F("d")

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: D = None
        self.w: C = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: C = None
        self.q: C = None
        self.x: D = None
        self.w: D = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: D = None
        self.s: F = None
        self.txt = txt

e = A("e")
l = B("l")
h = C("h")
c = D("c")
g = E("g")
k = F("k")
j = D("j")
d = F("d")

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