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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: C = None
        self.w: C = None
        self.t: F = None
        self.p: D = None
        self.q: G = None
        self.y: B = None
        self.z: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: F = None
        self.z: E = None
        self.p: E = None
        self.w: F = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: C = None
        self.w: C = None
        self.t: F = None
        self.p: D = None
        self.q: G = None
        self.y: B = None
        self.z: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: F = None
        self.z: E = None
        self.p: E = None
        self.w: F = None
        self.o: E = None
        self.txt = txt

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

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