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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: F = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: F = None
        self.p: B = None
        self.v: C = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: A = None
        self.x: H = None
        self.r: H = None
        self.o: G = None
        self.v: C = None
        self.u: E = None
        self.t: D = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: B = None
        self.w: A = None
        self.txt = txt

d = A("d")
g = B("g")
c = C("c")
i = D("i")
e = E("e")
k = F("k")
n = G("n")
f = H("f")
a = I("a")
l = G("l")

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: F = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: F = None
        self.p: B = None
        self.v: C = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: A = None
        self.x: H = None
        self.r: H = None
        self.o: G = None
        self.v: C = None
        self.u: E = None
        self.t: D = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: B = None
        self.w: A = None
        self.txt = txt

d = A("d")
g = B("g")
c = C("c")
i = D("i")
e = E("e")
k = F("k")
n = G("n")
f = H("f")
a = I("a")
l = G("l")

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