class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: H = None
        self.r: F = None
        self.q: B = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: E = None
        self.q: C = None
        self.t: E = None
        self.s: D = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: E = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: F = None
        self.t: F = None
        self.v: G = None
        self.r: D = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: C = None
        self.q: B = None
        self.x: E = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: E = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: E = None
        self.q: C = None
        self.t: E = None
        self.s: D = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: E = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: F = None
        self.t: F = None
        self.v: G = None
        self.r: D = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: C = None
        self.q: B = None
        self.x: E = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: E = None
        self.q: A = None
        self.txt = txt

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

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