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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: E = None
        self.u: G = None
        self.s: A = None
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: E = None
        self.u: G = None
        self.s: A = None
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: B = None
        self.txt = txt

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

f.z = g
f.s = i
f.o = i
f.y = i
f.q = m
f.r = k
f.x = c
g.w = i
g.q = i
g.o = i
g.z = c
g.t = c
g.s = k
g.r = f
c.t = b
c.z = g
c.x = k
m.o = i
m.u = i
m.r = b
m.s = f
m.p = c
b.x = k
b.q = k
b.z = g
b.w = c
b.p = c
b.s = m
b.r = m
k.o = i
k.x = i
k.y = c
k.p = f
k.r = m
i.y = f
i.w = g
assert c.x.r.r.z.s.x.txt == "i"