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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: D = None
        self.q: F = None
        self.o: D = None
        self.v: C = None
        self.txt = txt

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

i.q = f
i.x = j
i.o = e
b.p = i
b.s = a
a.y = n
a.p = n
a.t = n
a.r = f
a.x = f
a.v = l
f.y = i
l.x = a
l.y = a
l.q = i
l.w = b
n.s = e
e.s = n
e.q = n
e.u = f
e.o = f
e.v = a
j.q = f
j.x = i
j.o = e
assert j.x.x.o.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: A = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: D = None
        self.q: F = None
        self.o: D = None
        self.v: C = None
        self.txt = txt

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

i.q = f
i.x = j
i.o = e
b.p = i
b.s = a
a.y = n
a.p = n
a.t = n
a.r = f
a.x = f
a.v = l
f.y = i
l.x = a
l.y = a
l.q = i
l.w = b
n.s = e
e.s = n
e.q = n
e.u = f
e.o = f
e.v = a
j.q = f
j.x = i
j.o = e
assert j.x.x.o.v.txt == "a"