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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: G = None
        self.s: E = None
        self.y: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: B = None
        self.x: G = None
        self.t: C = None
        self.u: D = None
        self.txt = txt

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

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

f.t = m
f.q = b
n.r = e
n.w = j
n.s = a
n.y = a
k.t = i
b.p = a
b.r = m
a.v = g
a.q = n
a.y = i
a.z = f
a.p = m
a.r = b
a.x = e
g.v = e
g.s = n
g.x = j
g.t = k
g.u = b
j.p = i
j.r = m
i.p = j
i.r = m
e.t = i
m.r = k
m.w = j
m.s = a
m.y = a
assert f.t.r.t.r.w.r.w.p.r.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: G = None
        self.s: E = None
        self.y: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: B = None
        self.x: G = None
        self.t: C = None
        self.u: D = None
        self.txt = txt

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

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

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