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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: F = None
        self.r: A = None
        self.p: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: A = None
        self.txt = txt

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

g = A("g")
j = B("j")
l = C("l")
a = D("a")
n = E("n")
m = F("m")
i = G("i")
c = H("c")

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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: F = None
        self.r: A = None
        self.p: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: A = None
        self.txt = txt

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

g = A("g")
j = B("j")
l = C("l")
a = D("a")
n = E("n")
m = F("m")
i = G("i")
c = H("c")

g.y = m
g.t = i
g.x = i
g.o = i
g.u = a
g.q = a
g.r = a
g.z = l
j.u = g
j.q = n
j.t = m
l.t = g
l.r = g
l.u = m
l.p = a
a.z = g
a.s = l
a.q = i
n.z = a
n.x = a
n.o = m
n.v = m
n.s = j
n.y = j
n.r = l
m.y = j
m.t = l
i.w = j
i.z = g
c.p = i
c.u = i
c.q = i
c.w = i
c.s = g
c.o = l
c.x = l
c.y = a
assert a.q.w.q.y.u.u.q.w.txt == "j"