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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: C = None
        self.p: G = None
        self.x: C = None
        self.s: E = None
        self.t: F = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: E = None
        self.o: C = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

i = A("i")
n = B("n")
b = C("b")
d = D("d")
m = E("m")
h = F("h")
k = G("k")
j = F("j")

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: C = None
        self.p: G = None
        self.x: C = None
        self.s: E = None
        self.t: F = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: E = None
        self.o: C = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

i = A("i")
n = B("n")
b = C("b")
d = D("d")
m = E("m")
h = F("h")
k = G("k")
j = F("j")

i.o = n
i.q = n
i.r = m
i.y = m
i.t = j
i.v = b
i.z = b
n.q = k
n.p = k
n.z = b
n.x = b
n.y = b
n.s = m
n.t = h
b.r = m
b.z = m
b.x = n
b.y = h
d.w = m
d.s = m
d.o = b
d.p = n
m.w = b
h.y = i
k.s = m
k.y = j
k.p = b
k.w = n
j.y = i
assert i.y.w.z.w.x.x.z.w.txt == "b"