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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: C = None
        self.s: A = 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.o: E = None
        self.x: A = None
        self.v: E = None
        self.r: A = None
        self.s: G = None
        self.t: E = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: D = None
        self.w: F = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: D = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: B = None
        self.u: A = None
        self.w: F = None
        self.p: D = None
        self.txt = txt

e = A("e")
g = B("g")
m = C("m")
a = D("a")
j = E("j")
d = F("d")
b = G("b")

e.t = m
e.r = a
e.p = b
e.x = b
e.u = b
e.y = d
g.u = d
g.v = m
g.s = e
m.x = g
a.o = j
a.v = j
a.t = j
a.x = e
a.r = e
a.s = b
a.q = g
j.v = e
j.z = a
j.p = a
j.w = d
d.z = b
d.p = a
d.s = e
b.y = g
b.r = g
b.u = e
b.w = d
b.p = a
assert m.x.v.x.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: D = None
        self.p: G = None
        self.x: G = None
        self.y: F = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: C = None
        self.s: A = 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.o: E = None
        self.x: A = None
        self.v: E = None
        self.r: A = None
        self.s: G = None
        self.t: E = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: D = None
        self.w: F = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: D = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: B = None
        self.u: A = None
        self.w: F = None
        self.p: D = None
        self.txt = txt

e = A("e")
g = B("g")
m = C("m")
a = D("a")
j = E("j")
d = F("d")
b = G("b")

e.t = m
e.r = a
e.p = b
e.x = b
e.u = b
e.y = d
g.u = d
g.v = m
g.s = e
m.x = g
a.o = j
a.v = j
a.t = j
a.x = e
a.r = e
a.s = b
a.q = g
j.v = e
j.z = a
j.p = a
j.w = d
d.z = b
d.p = a
d.s = e
b.y = g
b.r = g
b.u = e
b.w = d
b.p = a
assert m.x.v.x.s.t.txt == "m"