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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

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

k = A("k")
a = B("a")
f = C("f")
l = D("l")
j = E("j")
d = F("d")
h = B("h")
g = B("g")

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

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

k = A("k")
a = B("a")
f = C("f")
l = D("l")
j = E("j")
d = F("d")
h = B("h")
g = B("g")

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