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

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: F = None
        self.o: F = None
        self.y: G = None
        self.w: C = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: A = None
        self.q: C = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: F = None
        self.o: F = None
        self.y: G = None
        self.w: C = None
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: A = None
        self.q: C = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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