class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: A = None
        self.v: F = None
        self.r: E = None
        self.z: E = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: F = None
        self.p: C = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: F = None
        self.p: C = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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