class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: D = None
        self.w: D = None
        self.y: C = None
        self.u: D = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: D = None
        self.v: D = None
        self.p: F = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: E = None
        self.o: B = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: D = None
        self.y: B = None
        self.t: F = None
        self.z: C = None
        self.r: A = None
        self.txt = txt

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

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

k = A("k")
n = B("n")
m = C("m")
a = D("a")
d = E("d")
e = F("e")
f = C("f")
l = F("l")
g = D("g")

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: D = None
        self.v: D = None
        self.p: F = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: E = None
        self.o: B = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: D = None
        self.y: B = None
        self.t: F = None
        self.z: C = None
        self.r: A = None
        self.txt = txt

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

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

k = A("k")
n = B("n")
m = C("m")
a = D("a")
d = E("d")
e = F("e")
f = C("f")
l = F("l")
g = D("g")

k.p = d
k.z = a
k.w = g
k.u = g
k.y = m
k.v = e
n.r = a
n.u = a
n.v = a
n.s = a
n.p = e
m.w = f
m.p = d
m.o = n
m.t = a
a.v = l
a.o = g
a.y = n
a.t = e
a.z = m
a.r = k
d.u = k
d.o = k
d.v = n
d.t = a
d.r = g
e.x = f
e.w = d
e.q = d
e.u = d
e.r = l
e.z = g
f.w = m
f.p = d
f.o = n
f.t = a
l.x = m
l.w = d
l.q = d
l.u = d
l.r = e
l.z = a
g.v = e
g.t = e
g.o = a
g.y = n
g.z = m
g.r = k
assert m.t.t.r.r.u.v.txt == "n"