class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

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

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

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

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

d = A("d")
k = B("k")
e = C("e")
h = D("h")
c = E("c")
i = F("i")
g = G("g")
n = A("n")
j = F("j")

d.r = c
k.w = e
k.z = g
e.v = i
e.s = h
e.t = d
e.q = g
e.r = c
h.y = g
h.s = n
c.w = g
c.p = g
c.t = e
c.s = e
c.o = k
i.s = d
i.t = g
i.w = g
i.o = g
i.x = j
i.r = h
i.z = e
g.t = d
n.r = c
j.s = n
j.t = g
j.w = g
j.o = g
j.x = i
j.r = h
j.z = e
assert n.r.t.t.r.t.t.r.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

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

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

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

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

d = A("d")
k = B("k")
e = C("e")
h = D("h")
c = E("c")
i = F("i")
g = G("g")
n = A("n")
j = F("j")

d.r = c
k.w = e
k.z = g
e.v = i
e.s = h
e.t = d
e.q = g
e.r = c
h.y = g
h.s = n
c.w = g
c.p = g
c.t = e
c.s = e
c.o = k
i.s = d
i.t = g
i.w = g
i.o = g
i.x = j
i.r = h
i.z = e
g.t = d
n.r = c
j.s = n
j.t = g
j.w = g
j.o = g
j.x = i
j.r = h
j.z = e
assert n.r.t.t.r.t.t.r.t.txt == "e"