class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: H = None
        self.w: E = None
        self.x: H = None
        self.z: H = None
        self.o: D = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: E = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: A = None
        self.p: A = None
        self.q: E = None
        self.s: H = None
        self.y: B = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: F = None
        self.v: D = None
        self.y: B = None
        self.u: D = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: G = None
        self.s: D = None
        self.o: A = None
        self.v: E = None
        self.x: B = None
        self.z: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: H = None
        self.w: E = None
        self.x: H = None
        self.z: H = None
        self.o: D = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: E = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: A = None
        self.p: A = None
        self.q: E = None
        self.s: H = None
        self.y: B = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: F = None
        self.v: D = None
        self.y: B = None
        self.u: D = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: G = None
        self.s: D = None
        self.o: A = None
        self.v: E = None
        self.x: B = None
        self.z: E = None
        self.txt = txt

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

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