class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: G = None
        self.v: C = None
        self.z: A = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: C = None
        self.w: C = None
        self.u: D = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: D = None
        self.p: A = None
        self.t: A = None
        self.y: B = None
        self.txt = txt

i = A("i")
l = B("l")
j = C("j")
c = D("c")
b = E("b")
n = F("n")
h = G("h")
e = B("e")
g = C("g")
f = A("f")

i.q = b
i.p = h
i.v = g
i.z = f
l.z = c
l.v = h
l.t = e
l.x = e
j.w = b
j.t = g
j.z = f
j.q = n
j.y = n
c.y = l
b.w = c
b.p = j
b.u = l
b.v = h
n.p = i
n.x = j
n.w = g
n.u = c
n.q = b
h.o = c
h.u = c
h.p = f
h.t = i
h.y = e
e.z = c
e.v = h
e.t = l
e.x = l
g.w = b
g.t = j
g.z = f
g.q = n
g.y = n
f.q = b
f.p = h
f.v = j
f.z = i
assert b.p.z.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: G = None
        self.v: C = None
        self.z: A = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: C = None
        self.w: C = None
        self.u: D = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: D = None
        self.p: A = None
        self.t: A = None
        self.y: B = None
        self.txt = txt

i = A("i")
l = B("l")
j = C("j")
c = D("c")
b = E("b")
n = F("n")
h = G("h")
e = B("e")
g = C("g")
f = A("f")

i.q = b
i.p = h
i.v = g
i.z = f
l.z = c
l.v = h
l.t = e
l.x = e
j.w = b
j.t = g
j.z = f
j.q = n
j.y = n
c.y = l
b.w = c
b.p = j
b.u = l
b.v = h
n.p = i
n.x = j
n.w = g
n.u = c
n.q = b
h.o = c
h.u = c
h.p = f
h.t = i
h.y = e
e.z = c
e.v = h
e.t = l
e.x = l
g.w = b
g.t = j
g.z = f
g.q = n
g.y = n
f.q = b
f.p = h
f.v = j
f.z = i
assert b.p.z.q.v.txt == "h"