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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: G = None
        self.o: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: G = None
        self.o: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

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

m.z = i
m.p = c
m.o = k
i.s = c
i.t = j
k.q = c
k.v = a
k.o = g
b.x = i
f.y = m
f.r = c
f.p = b
c.y = i
a.w = m
a.x = c
g.q = c
g.v = a
g.o = k
j.y = m
j.r = c
j.p = b
l.y = m
l.r = c
l.p = b
assert a.w.o.o.q.y.txt == "i"