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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: D = None
        self.z: E = None
        self.r: F = None
        self.p: G = None
        self.v: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: A = None
        self.t: F = None
        self.txt = txt

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

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

j = A("j")
c = B("c")
g = C("g")
e = D("e")
m = E("m")
i = F("i")
d = G("d")
b = A("b")
a = D("a")
k = B("k")

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: D = None
        self.z: E = None
        self.r: F = None
        self.p: G = None
        self.v: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: A = None
        self.t: F = None
        self.txt = txt

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

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

j = A("j")
c = B("c")
g = C("g")
e = D("e")
m = E("m")
i = F("i")
d = G("d")
b = A("b")
a = D("a")
k = B("k")

j.s = b
c.u = i
c.r = i
c.o = a
c.z = m
c.p = d
c.v = k
g.v = j
g.u = m
g.p = c
e.q = a
m.s = g
m.w = b
m.t = i
i.v = a
d.x = i
d.q = a
b.s = j
a.q = e
k.u = i
k.r = i
k.o = a
k.z = m
k.p = d
k.v = c
assert i.v.q.q.q.q.q.q.q.txt == "e"