class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: G = None
        self.r: H = None
        self.u: E = None
        self.t: C = None
        self.z: C = None
        self.y: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: D = None
        self.z: A = None
        self.v: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: D = None
        self.z: A = None
        self.v: G = None
        self.txt = txt

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

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