class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: F = None
        self.y: B = None
        self.q: D = None
        self.o: C = None
        self.p: F = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: D = None
        self.y: D = None
        self.r: A = None
        self.u: D = None
        self.x: A = None
        self.o: F = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: D = None
        self.y: D = None
        self.r: A = None
        self.u: D = None
        self.x: A = None
        self.o: F = None
        self.p: A = None
        self.txt = txt

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

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