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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: D = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: D = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

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