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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: A = None
        self.o: A = None
        self.p: C = None
        self.w: F = None
        self.x: D = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: B = None
        self.p: D = None
        self.w: F = None
        self.v: B = None
        self.z: D = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

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

e.p = b
e.x = a
e.q = a
e.w = l
e.y = c
b.y = n
b.w = n
b.u = n
b.v = l
b.o = e
b.p = c
b.x = a
c.y = n
c.w = n
c.x = b
c.v = b
c.q = b
c.p = a
c.z = a
a.r = b
a.x = i
m.p = i
n.v = a
n.y = l
i.o = c
i.x = b
i.q = e
l.p = b
l.x = a
l.q = a
l.w = e
l.y = c
assert a.x.o.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: D = None
        self.w: A = None
        self.y: C = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: A = None
        self.o: A = None
        self.p: C = None
        self.w: F = None
        self.x: D = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: B = None
        self.p: D = None
        self.w: F = None
        self.v: B = None
        self.z: D = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

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

e.p = b
e.x = a
e.q = a
e.w = l
e.y = c
b.y = n
b.w = n
b.u = n
b.v = l
b.o = e
b.p = c
b.x = a
c.y = n
c.w = n
c.x = b
c.v = b
c.q = b
c.p = a
c.z = a
a.r = b
a.x = i
m.p = i
n.v = a
n.y = l
i.o = c
i.x = b
i.q = e
l.p = b
l.x = a
l.q = a
l.w = e
l.y = c
assert a.x.o.v.v.txt == "l"