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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: E = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: F = None
        self.x: E = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: B = None
        self.v: C = None
        self.x: A = None
        self.r: E = None
        self.p: D = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: D = None
        self.t: A = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: E = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: F = None
        self.x: E = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: B = None
        self.v: C = None
        self.x: A = None
        self.r: E = None
        self.p: D = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: D = None
        self.t: A = None
        self.x: C = None
        self.txt = txt

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

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