class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: F = None
        self.q: B = None
        self.z: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: F = None
        self.z: G = None
        self.y: H = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: F = None
        self.o: D = None
        self.x: D = None
        self.r: H = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: F = None
        self.z: G = None
        self.y: H = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: F = None
        self.o: D = None
        self.x: D = None
        self.r: H = None
        self.p: C = None
        self.txt = txt

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

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

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