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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: C = None
        self.o: G = None
        self.t: G = None
        self.u: G = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: G = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: A = None
        self.o: A = None
        self.r: F = None
        self.z: F = None
        self.p: F = None
        self.u: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: C = None
        self.o: G = None
        self.t: G = None
        self.u: G = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: G = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: A = None
        self.o: A = None
        self.r: F = None
        self.z: F = None
        self.p: F = None
        self.u: F = None
        self.txt = txt

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

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

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

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