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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: D = None
        self.z: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

k = A("k")
c = B("c")
d = C("d")
m = D("m")
f = E("f")
e = F("e")
i = G("i")
n = F("n")

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: D = None
        self.z: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

k = A("k")
c = B("c")
d = C("d")
m = D("m")
f = E("f")
e = F("e")
i = G("i")
n = F("n")

k.r = m
k.t = f
k.y = n
k.z = i
k.w = d
c.r = d
c.t = d
c.w = k
c.x = k
c.o = e
c.s = n
c.z = i
d.t = i
d.z = i
d.s = m
m.q = f
m.s = d
m.z = n
m.v = c
f.o = m
f.s = m
f.u = d
f.z = i
f.v = i
f.r = k
e.t = m
e.z = m
e.w = m
e.u = c
e.q = n
e.s = f
i.w = m
n.t = m
n.z = m
n.w = m
n.u = c
n.q = e
n.s = f
assert d.s.s.s.txt == "m"