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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: E = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: F = None
        self.x: C = None
        self.w: B = None
        self.o: C = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: D = None
        self.t: D = None
        self.txt = txt

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

e = A("e")
l = B("l")
n = C("n")
a = D("a")
g = E("g")
b = F("b")
k = B("k")
h = F("h")
c = B("c")

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: E = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: F = None
        self.x: C = None
        self.w: B = None
        self.o: C = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: D = None
        self.t: D = None
        self.txt = txt

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

e = A("e")
l = B("l")
n = C("n")
a = D("a")
g = E("g")
b = F("b")
k = B("k")
h = F("h")
c = B("c")

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