class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: E = None
        self.y: B = None
        self.o: D = None
        self.z: B = None
        self.w: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: E = None
        self.u: A = None
        self.w: A = None
        self.s: E = None
        self.v: C = None
        self.txt = txt

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

j = A("j")
g = B("g")
k = C("k")
b = D("b")
n = E("n")
e = F("e")
f = A("f")
m = E("m")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: E = None
        self.u: A = None
        self.w: A = None
        self.s: E = None
        self.v: C = None
        self.txt = txt

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

j = A("j")
g = B("g")
k = C("k")
b = D("b")
n = E("n")
e = F("e")
f = A("f")
m = E("m")

j.t = n
j.u = m
j.y = g
j.z = g
j.w = g
j.o = b
g.r = b
k.v = e
b.y = m
n.q = k
n.v = k
n.x = m
n.s = m
n.u = f
n.w = j
e.x = b
e.v = f
f.t = m
f.u = n
f.y = g
f.z = g
f.w = g
f.o = b
m.q = k
m.v = k
m.x = n
m.s = n
m.u = j
m.w = j
assert f.u.v.v.x.y.v.txt == "k"