class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: B = None
        self.o: F = None
        self.t: E = None
        self.u: G = None
        self.y: B = None
        self.s: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: G = None
        self.q: G = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: C = None
        self.o: E = None
        self.r: F = None
        self.z: F = None
        self.p: B = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: E = None
        self.q: C = None
        self.x: B = None
        self.p: G = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: F = None
        self.r: G = None
        self.s: E = None
        self.w: A = None
        self.y: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: G = None
        self.q: G = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: C = None
        self.o: E = None
        self.r: F = None
        self.z: F = None
        self.p: B = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: E = None
        self.q: C = None
        self.x: B = None
        self.p: G = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: F = None
        self.r: G = None
        self.s: E = None
        self.w: A = None
        self.y: A = None
        self.txt = txt

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

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