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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: F = None
        self.o: E = None
        self.y: F = None
        self.t: F = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: G = None
        self.u: D = None
        self.p: F = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: A = None
        self.x: D = None
        self.w: D = None
        self.t: D = None
        self.p: C = None
        self.txt = txt

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

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

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

d = A("d")
c = B("c")
m = C("m")
i = D("i")
b = E("b")
n = F("n")
l = G("l")
j = C("j")
g = B("g")
h = D("h")

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: F = None
        self.o: E = None
        self.y: F = None
        self.t: F = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: G = None
        self.u: D = None
        self.p: F = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: A = None
        self.x: D = None
        self.w: D = None
        self.t: D = None
        self.p: C = None
        self.txt = txt

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

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

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

d = A("d")
c = B("c")
m = C("m")
i = D("i")
b = E("b")
n = F("n")
l = G("l")
j = C("j")
g = B("g")
h = D("h")

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