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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: F = None
        self.y: D = None
        self.o: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: C = None
        self.u: E = None
        self.z: A = None
        self.r: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: F = None
        self.y: D = None
        self.o: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: C = None
        self.u: E = None
        self.z: A = None
        self.r: E = None
        self.txt = txt

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

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

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