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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: G = None
        self.p: H = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: G = None
        self.t: E = None
        self.w: A = None
        self.o: G = None
        self.v: E = None
        self.z: F = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: A = None
        self.v: A = None
        self.s: A = None
        self.r: F = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: C = None
        self.t: E = None
        self.r: C = None
        self.u: C = None
        self.txt = txt

k = A("k")
g = B("g")
m = C("m")
a = D("a")
b = E("b")
c = F("c")
j = G("j")
e = H("e")

k.t = m
k.v = a
g.u = j
g.t = m
m.u = j
m.v = j
m.p = e
m.s = g
a.s = b
a.t = b
a.v = b
a.y = b
a.u = j
a.o = j
a.w = k
a.z = c
b.u = c
b.r = c
b.x = k
b.v = k
b.s = k
b.o = g
c.x = a
c.y = j
j.o = g
j.u = c
j.t = a
e.p = k
e.w = m
e.r = m
e.u = m
e.t = b
assert b.o.u.o.t.p.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: G = None
        self.p: H = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: G = None
        self.t: E = None
        self.w: A = None
        self.o: G = None
        self.v: E = None
        self.z: F = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: A = None
        self.v: A = None
        self.s: A = None
        self.r: F = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: C = None
        self.t: E = None
        self.r: C = None
        self.u: C = None
        self.txt = txt

k = A("k")
g = B("g")
m = C("m")
a = D("a")
b = E("b")
c = F("c")
j = G("j")
e = H("e")

k.t = m
k.v = a
g.u = j
g.t = m
m.u = j
m.v = j
m.p = e
m.s = g
a.s = b
a.t = b
a.v = b
a.y = b
a.u = j
a.o = j
a.w = k
a.z = c
b.u = c
b.r = c
b.x = k
b.v = k
b.s = k
b.o = g
c.x = a
c.y = j
j.o = g
j.u = c
j.t = a
e.p = k
e.w = m
e.r = m
e.u = m
e.t = b
assert b.o.u.o.t.p.t.u.txt == "c"