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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: F = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: A = None
        self.r: C = None
        self.v: C = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: F = None
        self.s: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: F = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: A = None
        self.r: C = None
        self.v: C = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: F = None
        self.s: B = None
        self.txt = txt

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

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

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