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

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

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

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

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

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

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

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

h.s = m
h.q = n
h.r = e
f.u = k
f.t = m
f.z = m
f.s = i
f.v = i
f.r = e
f.w = g
e.q = f
e.t = f
e.u = h
e.v = m
e.s = m
e.y = k
g.r = f
c.y = n
c.u = k
c.t = i
c.r = e
k.r = m
k.s = e
m.y = n
n.s = m
n.q = h
n.r = e
i.y = h
i.u = k
i.t = c
i.r = e
j.s = m
j.q = h
j.r = e
assert j.r.q.u.r.y.r.txt == "
class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: A = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

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

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

h.s = m
h.q = n
h.r = e
f.u = k
f.t = m
f.z = m
f.s = i
f.v = i
f.r = e
f.w = g
e.q = f
e.t = f
e.u = h
e.v = m
e.s = m
e.y = k
g.r = f
c.y = n
c.u = k
c.t = i
c.r = e
k.r = m
k.s = e
m.y = n
n.s = m
n.q = h
n.r = e
i.y = h
i.u = k
i.t = c
i.r = e
j.s = m
j.q = h
j.r = e
assert j.r.q.u.r.y.r.txt == "e"