class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: F = None
        self.v: C = None
        self.x: B = None
        self.s: F = None
        self.u: D = None
        self.r: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: H = None
        self.q: C = None
        self.o: G = None
        self.p: H = None
        self.y: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: G = None
        self.t: G = None
        self.y: C = None
        self.p: F = None
        self.x: C = None
        self.txt = txt

h = A("h")
i = B("i")
a = C("a")
j = D("j")
l = E("l")
n = F("n")
c = G("c")
b = H("b")

h.q = j
h.u = j
h.t = n
h.s = n
h.r = n
h.v = a
h.x = i
i.u = h
i.p = h
i.s = j
i.z = j
i.o = a
i.w = b
i.v = c
i.q = n
a.q = j
a.u = n
a.y = h
j.r = a
j.q = a
j.z = b
j.p = b
j.o = c
j.y = i
l.z = c
n.q = h
n.t = a
c.t = i
c.r = l
c.u = a
b.o = h
b.v = c
b.t = c
b.y = a
b.x = a
b.p = n
assert c.r.z.r.z.t.u.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: F = None
        self.v: C = None
        self.x: B = None
        self.s: F = None
        self.u: D = None
        self.r: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: H = None
        self.q: C = None
        self.o: G = None
        self.p: H = None
        self.y: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: G = None
        self.t: G = None
        self.y: C = None
        self.p: F = None
        self.x: C = None
        self.txt = txt

h = A("h")
i = B("i")
a = C("a")
j = D("j")
l = E("l")
n = F("n")
c = G("c")
b = H("b")

h.q = j
h.u = j
h.t = n
h.s = n
h.r = n
h.v = a
h.x = i
i.u = h
i.p = h
i.s = j
i.z = j
i.o = a
i.w = b
i.v = c
i.q = n
a.q = j
a.u = n
a.y = h
j.r = a
j.q = a
j.z = b
j.p = b
j.o = c
j.y = i
l.z = c
n.q = h
n.t = a
c.t = i
c.r = l
c.u = a
b.o = h
b.v = c
b.t = c
b.y = a
b.x = a
b.p = n
assert c.r.z.r.z.t.u.txt == "h"