class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: D = None
        self.t: E = None
        self.u: H = None
        self.o: H = None
        self.r: E = None
        self.v: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: E = None
        self.z: H = None
        self.u: A = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: H = None
        self.p: A = None
        self.w: B = None
        self.y: D = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: G = None
        self.v: E = None
        self.u: A = None
        self.p: B = None
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: E = None
        self.u: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: E = None
        self.z: H = None
        self.u: A = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: H = None
        self.p: A = None
        self.w: B = None
        self.y: D = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: G = None
        self.v: E = None
        self.u: A = None
        self.p: B = None
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: E = None
        self.u: A = None
        self.txt = txt

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

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