class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: F = None
        self.w: G = None
        self.r: A = None
        self.t: G = None
        self.v: G = None
        self.txt = txt

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

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

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

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

i = A("i")
b = B("b")
f = C("f")
l = D("l")
d = E("d")
k = F("k")
n = G("n")
h = F("h")
a = D("a")

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: F = None
        self.w: G = None
        self.r: A = None
        self.t: G = None
        self.v: G = None
        self.txt = txt

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

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

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

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

i = A("i")
b = B("b")
f = C("f")
l = D("l")
d = E("d")
k = F("k")
n = G("n")
h = F("h")
a = D("a")

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