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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: B = None
        self.r: F = None
        self.o: B = None
        self.v: B = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: E = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: A = None
        self.u: A = None
        self.v: G = None
        self.w: G = None
        self.x: A = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: G = None
        self.o: B = None
        self.t: B = None
        self.q: F = None
        self.u: B = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: B = None
        self.r: F = None
        self.o: B = None
        self.v: B = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: E = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: A = None
        self.u: A = None
        self.v: G = None
        self.w: G = None
        self.x: A = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: G = None
        self.o: B = None
        self.t: B = None
        self.q: F = None
        self.u: B = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: C = None
        self.txt = txt

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

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