class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: D = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: E = None
        self.r: B = None
        self.t: C = None
        self.w: C = None
        self.o: B = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: D = None
        self.u: A = None
        self.z: A = None
        self.t: D = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: D = None
        self.o: E = None
        self.y: G = None
        self.q: D = None
        self.s: E = None
        self.txt = txt

i = A("i")
n = B("n")
k = C("k")
h = D("h")
e = E("e")
j = F("j")
c = G("c")
a = G("a")
d = C("d")

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: D = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: E = None
        self.r: B = None
        self.t: C = None
        self.w: C = None
        self.o: B = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: D = None
        self.u: A = None
        self.z: A = None
        self.t: D = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: D = None
        self.o: E = None
        self.y: G = None
        self.q: D = None
        self.s: E = None
        self.txt = txt

i = A("i")
n = B("n")
k = C("k")
h = D("h")
e = E("e")
j = F("j")
c = G("c")
a = G("a")
d = C("d")

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