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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: G = None
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: F = None
        self.x: A = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: D = None
        self.r: G = None
        self.x: G = None
        self.y: G = None
        self.t: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: G = None
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: F = None
        self.x: A = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: D = None
        self.r: G = None
        self.x: G = None
        self.y: G = None
        self.t: C = None
        self.txt = txt

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

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

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