class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: C = None
        self.q: C = None
        self.r: F = None
        self.o: E = None
        self.w: G = None
        self.v: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: B = None
        self.t: C = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: B = None
        self.t: C = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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