class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.v: A = None
        self.o: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: A = None
        self.y: A = None
        self.x: A = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: C = None
        self.txt = txt

b = A("b")
a = B("a")
m = C("m")
g = D("g")
i = E("i")
f = F("f")
k = G("k")
e = A("e")
l = C("l")

b.x = i
b.z = i
b.v = e
b.o = e
a.x = b
m.r = f
m.u = f
m.w = e
m.y = e
m.x = b
g.x = i
i.x = b
i.o = f
i.q = g
f.v = m
f.t = b
f.o = k
f.q = k
k.t = f
k.w = m
e.x = i
e.z = i
e.v = b
e.o = b
l.r = f
l.u = f
l.w = b
l.y = b
l.x = b
assert i.x.v.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.v: A = None
        self.o: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: A = None
        self.y: A = None
        self.x: A = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: C = None
        self.txt = txt

b = A("b")
a = B("a")
m = C("m")
g = D("g")
i = E("i")
f = F("f")
k = G("k")
e = A("e")
l = C("l")

b.x = i
b.z = i
b.v = e
b.o = e
a.x = b
m.r = f
m.u = f
m.w = e
m.y = e
m.x = b
g.x = i
i.x = b
i.o = f
i.q = g
f.v = m
f.t = b
f.o = k
f.q = k
k.t = f
k.w = m
e.x = i
e.z = i
e.v = b
e.o = b
l.r = f
l.u = f
l.w = b
l.y = b
l.x = b
assert i.x.v.o.txt == "b"