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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: C = None
        self.q: A = None
        self.x: D = None
        self.u: D = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: C = None
        self.q: A = None
        self.x: D = None
        self.u: D = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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