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

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

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

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

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

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

h = A("h")
f = B("f")
n = C("n")
k = D("k")
j = E("j")
e = F("e")
d = E("d")
b = D("b")
l = B("l")

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

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

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

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

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

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

h = A("h")
f = B("f")
n = C("n")
k = D("k")
j = E("j")
e = F("e")
d = E("d")
b = D("b")
l = B("l")

h.r = n
h.y = l
f.o = l
f.r = b
n.t = j
n.x = j
n.z = h
n.v = h
n.w = e
n.u = k
k.p = n
k.r = f
k.v = h
j.o = h
j.w = h
j.t = h
j.z = f
j.v = n
e.o = l
e.t = n
e.s = h
e.z = k
e.r = b
e.y = d
d.o = h
d.w = h
d.t = h
d.z = l
d.v = n
b.p = n
b.r = f
b.v = h
l.o = f
l.r = k
assert h.y.r.v.y.txt == "l"