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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: D = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: A = None
        self.y: A = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: D = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: A = None
        self.y: A = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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