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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: A = None
        self.txt = txt

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

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

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