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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

j.u = b
j.y = i
j.r = h
j.x = m
b.r = n
b.o = k
h.r = m
h.u = m
h.z = m
h.s = l
h.t = j
h.y = i
g.v = l
g.q = k
g.z = i
g.o = i
g.r = n
l.t = b
l.q = j
i.w = l
m.t = g
m.r = e
m.w = h
m.s = l
e.u = b
e.y = i
e.r = h
e.x = m
k.v = l
k.q = g
k.z = i
k.o = i
k.r = b
n.r = b
n.o = g
assert n.o.o.w.t.r.r.o.v.q.txt == "j"