class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: B = None
        self.s: F = None
        self.u: F = None
        self.v: D = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.q: E = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: D = None
        self.r: F = None
        self.v: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.q: E = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: D = None
        self.r: F = None
        self.v: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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