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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: F = None
        self.q: F = None
        self.p: A = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: B = None
        self.r: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: F = None
        self.q: F = None
        self.p: A = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: B = None
        self.r: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: A = None
        self.txt = txt

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

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