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

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

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

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

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

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

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

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

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

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

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

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

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

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

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