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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: F = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: B = None
        self.z: F = None
        self.y: G = None
        self.o: A = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: F = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: B = None
        self.z: F = None
        self.y: G = None
        self.o: A = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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