class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: C = None
        self.v: E = None
        self.t: C = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: E = None
        self.o: F = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: G = None
        self.x: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: D = None
        self.t: D = None
        self.o: D = None
        self.s: E = None
        self.txt = txt

g = A("g")
m = B("m")
b = C("b")
k = D("k")
l = E("l")
h = F("h")
j = G("j")

g.z = m
g.q = b
g.t = b
g.s = b
g.v = l
m.v = h
m.o = h
m.x = l
m.t = b
b.r = l
b.o = l
b.z = m
b.y = m
b.s = g
b.u = h
k.q = g
k.v = j
k.x = h
l.o = k
l.u = k
l.v = h
l.w = j
l.y = j
l.x = j
l.q = b
h.t = g
h.x = g
h.r = l
h.z = m
j.q = h
j.v = k
j.t = k
j.o = k
j.s = l
assert b.u.r.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: C = None
        self.v: E = None
        self.t: C = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: E = None
        self.o: F = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: G = None
        self.x: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: D = None
        self.t: D = None
        self.o: D = None
        self.s: E = None
        self.txt = txt

g = A("g")
m = B("m")
b = C("b")
k = D("k")
l = E("l")
h = F("h")
j = G("j")

g.z = m
g.q = b
g.t = b
g.s = b
g.v = l
m.v = h
m.o = h
m.x = l
m.t = b
b.r = l
b.o = l
b.z = m
b.y = m
b.s = g
b.u = h
k.q = g
k.v = j
k.x = h
l.o = k
l.u = k
l.v = h
l.w = j
l.y = j
l.x = j
l.q = b
h.t = g
h.x = g
h.r = l
h.z = m
j.q = h
j.v = k
j.t = k
j.o = k
j.s = l
assert b.u.r.q.u.txt == "h"