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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: G = None
        self.u: F = None
        self.w: B = None
        self.z: D = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: G = None
        self.s: G = None
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: A = None
        self.x: D = None
        self.r: B = None
        self.z: A = None
        self.w: D = None
        self.q: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: G = None
        self.u: F = None
        self.w: B = None
        self.z: D = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: G = None
        self.s: G = None
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: A = None
        self.x: D = None
        self.r: B = None
        self.z: A = None
        self.w: D = None
        self.q: C = None
        self.txt = txt

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

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