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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: A = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: A = None
        self.w: C = None
        self.txt = txt

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

l.u = k
l.v = g
l.y = b
l.p = a
k.v = l
a.u = l
a.o = g
h.o = l
h.s = g
h.y = b
h.w = k
h.u = k
b.v = k
b.z = g
b.w = h
b.u = h
b.r = f
c.z = l
c.q = l
c.w = a
d.o = l
d.s = c
d.y = f
d.w = k
d.u = k
f.v = k
f.z = c
f.w = d
f.u = d
f.r = b
g.z = l
g.q = l
g.w = a
m.u = l
m.o = c
assert l.u.v.p.u.u.v.p.u.y.u.txt == "h"