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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: G = None
        self.w: E = None
        self.t: F = None
        self.q: C = None
        self.z: F = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: F = None
        self.v: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: D = None
        self.v: C = None
        self.t: A = None
        self.x: C = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: G = None
        self.w: E = None
        self.t: F = None
        self.q: C = None
        self.z: F = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: F = None
        self.v: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: D = None
        self.v: C = None
        self.t: A = None
        self.x: C = None
        self.w: A = None
        self.txt = txt

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

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