class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: B = None
        self.q: C = None
        self.t: A = None
        self.p: B = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: E = None
        self.y: C = None
        self.s: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: A = None
        self.q: B = None
        self.w: A = None
        self.t: A = None
        self.r: A = None
        self.s: F = None
        self.txt = txt

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

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

c = A("c")
i = B("i")
l = C("l")
j = D("j")
d = E("d")
a = F("a")
f = G("f")
h = C("h")
n = A("n")
b = A("b")

c.s = n
c.o = i
c.p = i
c.z = i
c.q = l
c.t = b
i.z = a
i.p = d
i.s = d
i.y = h
l.x = h
l.v = h
l.r = c
l.z = c
l.o = j
l.p = f
j.q = d
j.r = a
j.t = a
d.o = l
d.v = c
d.t = c
d.r = c
d.q = i
d.w = n
d.s = a
a.v = b
f.t = i
f.o = b
h.x = l
h.v = l
h.r = b
h.o = j
h.z = n
h.p = f
n.s = c
n.t = c
n.o = i
n.p = i
n.z = i
n.q = h
b.s = c
b.t = c
b.o = i
b.p = i
b.z = i
b.q = h
assert c.s.p.z.v.q.txt == "
class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: B = None
        self.q: C = None
        self.t: A = None
        self.p: B = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: E = None
        self.y: C = None
        self.s: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: A = None
        self.q: B = None
        self.w: A = None
        self.t: A = None
        self.r: A = None
        self.s: F = None
        self.txt = txt

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

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

c = A("c")
i = B("i")
l = C("l")
j = D("j")
d = E("d")
a = F("a")
f = G("f")
h = C("h")
n = A("n")
b = A("b")

c.s = n
c.o = i
c.p = i
c.z = i
c.q = l
c.t = b
i.z = a
i.p = d
i.s = d
i.y = h
l.x = h
l.v = h
l.r = c
l.z = c
l.o = j
l.p = f
j.q = d
j.r = a
j.t = a
d.o = l
d.v = c
d.t = c
d.r = c
d.q = i
d.w = n
d.s = a
a.v = b
f.t = i
f.o = b
h.x = l
h.v = l
h.r = b
h.o = j
h.z = n
h.p = f
n.s = c
n.t = c
n.o = i
n.p = i
n.z = i
n.q = h
b.s = c
b.t = c
b.o = i
b.p = i
b.z = i
b.q = h
assert c.s.p.z.v.q.txt == "h"