class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: D = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: F = None
        self.o: D = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: B = None
        self.r: A = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: C = None
        self.y: A = None
        self.q: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: F = None
        self.o: D = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: B = None
        self.r: A = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: C = None
        self.y: A = None
        self.q: A = None
        self.txt = txt

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

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

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

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