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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: F = None
        self.v: B = None
        self.p: F = None
        self.w: B = None
        self.x: C = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: B = None
        self.s: G = None
        self.r: D = None
        self.z: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: B = None
        self.txt = txt

i = A("i")
h = B("h")
k = C("k")
c = D("c")
l = E("l")
m = F("m")
n = G("n")
f = F("f")
g = F("g")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: F = None
        self.v: B = None
        self.p: F = None
        self.w: B = None
        self.x: C = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: B = None
        self.s: G = None
        self.r: D = None
        self.z: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: B = None
        self.txt = txt

i = A("i")
h = B("h")
k = C("k")
c = D("c")
l = E("l")
m = F("m")
n = G("n")
f = F("f")
g = F("g")

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