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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: F = None
        self.y: D = None
        self.r: E = None
        self.p: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: B = None
        self.txt = txt

h = A("h")
g = B("g")
m = C("m")
k = D("k")
i = E("i")
e = F("e")
f = E("f")
n = B("n")
l = E("l")

h.x = f
h.p = i
h.o = m
h.r = k
h.y = l
g.t = e
g.q = e
g.y = k
g.r = f
g.p = m
m.q = i
k.q = m
i.x = h
i.v = h
i.y = h
i.z = h
i.q = k
i.r = m
e.v = i
e.x = n
f.x = h
f.v = h
f.y = h
f.z = h
f.q = k
f.r = m
n.t = e
n.q = e
n.y = k
n.r = l
n.p = m
l.x = h
l.v = h
l.y = h
l.z = h
l.q = k
l.r = m
assert i.y.r.q.q.q.q.q.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: E = None
        self.o: C = None
        self.r: D = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: F = None
        self.y: D = None
        self.r: E = None
        self.p: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: B = None
        self.txt = txt

h = A("h")
g = B("g")
m = C("m")
k = D("k")
i = E("i")
e = F("e")
f = E("f")
n = B("n")
l = E("l")

h.x = f
h.p = i
h.o = m
h.r = k
h.y = l
g.t = e
g.q = e
g.y = k
g.r = f
g.p = m
m.q = i
k.q = m
i.x = h
i.v = h
i.y = h
i.z = h
i.q = k
i.r = m
e.v = i
e.x = n
f.x = h
f.v = h
f.y = h
f.z = h
f.q = k
f.r = m
n.t = e
n.q = e
n.y = k
n.r = l
n.p = m
l.x = h
l.v = h
l.y = h
l.z = h
l.q = k
l.r = m
assert i.y.r.q.q.q.q.q.txt == "i"