class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: D = None
        self.t: C = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: D = None
        self.x: C = None
        self.t: E = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: E = None
        self.v: A = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: C = None
        self.p: D = None
        self.o: G = None
        self.y: A = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: E = None
        self.u: D = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: D = None
        self.x: C = None
        self.t: E = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: E = None
        self.v: A = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: C = None
        self.p: D = None
        self.o: G = None
        self.y: A = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: E = None
        self.u: D = None
        self.t: C = None
        self.txt = txt

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

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