class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: E = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: G = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: F = None
        self.q: F = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: A = None
        self.v: H = None
        self.o: C = None
        self.x: D = None
        self.q: C = None
        self.z: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: E = None
        self.r: C = None
        self.o: A = None
        self.w: F = None
        self.u: E = None
        self.txt = txt

e = A("e")
k = B("k")
b = C("b")
c = D("c")
d = E("d")
i = F("i")
a = G("a")
h = H("h")
l = B("l")

e.q = h
e.r = d
e.w = d
k.w = d
k.p = a
k.z = b
b.x = a
c.t = d
c.z = i
c.q = i
c.s = b
d.s = e
d.u = e
d.v = h
d.o = b
d.q = b
d.x = c
d.z = a
i.t = k
a.r = i
a.x = b
a.t = d
a.w = c
a.y = c
a.v = h
a.o = h
h.v = c
h.x = d
h.u = d
h.r = b
h.o = e
h.w = i
l.w = d
l.p = a
l.z = b
assert i.t.z.x.t.x.q.t.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: E = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: G = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: F = None
        self.q: F = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: A = None
        self.v: H = None
        self.o: C = None
        self.x: D = None
        self.q: C = None
        self.z: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: E = None
        self.r: C = None
        self.o: A = None
        self.w: F = None
        self.u: E = None
        self.txt = txt

e = A("e")
k = B("k")
b = C("b")
c = D("c")
d = E("d")
i = F("i")
a = G("a")
h = H("h")
l = B("l")

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