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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: D = None
        self.q: F = None
        self.t: F = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: C = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: D = None
        self.txt = txt

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

n = A("n")
f = B("f")
g = C("g")
c = D("c")
a = E("a")
i = F("i")
e = D("e")
h = A("h")
l = D("l")

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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: D = None
        self.q: F = None
        self.t: F = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: C = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: D = None
        self.txt = txt

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

n = A("n")
f = B("f")
g = C("g")
c = D("c")
a = E("a")
i = F("i")
e = D("e")
h = A("h")
l = D("l")

n.r = i
f.o = c
f.r = i
f.x = g
f.u = g
g.x = l
g.z = l
g.o = c
g.q = i
g.t = i
c.s = l
c.z = g
c.u = f
a.v = e
a.o = c
i.r = a
i.w = g
i.t = g
i.y = h
i.u = f
e.s = l
e.z = g
e.u = f
h.r = i
l.s = c
l.z = g
l.u = f
assert i.u.o.u.r.w.t.txt == "i"