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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: A = None
        self.txt = txt

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

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