class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: B = None
        self.r: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: B = None
        self.q: E = None
        self.s: C = None
        self.y: E = None
        self.x: G = None
        self.t: G = None
        self.txt = txt

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

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

b.y = d
b.t = d
b.r = c
d.q = e
d.o = f
d.r = n
d.z = b
f.v = g
f.u = k
f.x = n
f.y = c
f.o = b
f.p = e
e.x = f
c.q = e
g.o = c
g.q = c
g.y = c
g.v = d
g.s = f
g.x = k
g.t = n
k.t = c
k.s = n
k.u = n
k.z = b
k.r = b
k.y = f
n.t = c
n.s = k
n.u = k
n.z = b
n.r = b
n.y = f
assert e.x.y.q.x.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: B = None
        self.r: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: B = None
        self.q: E = None
        self.s: C = None
        self.y: E = None
        self.x: G = None
        self.t: G = None
        self.txt = txt

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

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

b.y = d
b.t = d
b.r = c
d.q = e
d.o = f
d.r = n
d.z = b
f.v = g
f.u = k
f.x = n
f.y = c
f.o = b
f.p = e
e.x = f
c.q = e
g.o = c
g.q = c
g.y = c
g.v = d
g.s = f
g.x = k
g.t = n
k.t = c
k.s = n
k.u = n
k.z = b
k.r = b
k.y = f
n.t = c
n.s = k
n.u = k
n.z = b
n.r = b
n.y = f
assert e.x.y.q.x.v.s.txt == "f"