class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: C = None
        self.z: F = None
        self.t: C = None
        self.w: F = None
        self.p: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: C = None
        self.u: C = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: C = None
        self.u: C = None
        self.z: C = None
        self.txt = txt

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

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

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

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