class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: D = None
        self.x: E = None
        self.s: B = None
        self.z: G = None
        self.t: A = None
        self.u: B = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: A = None
        self.y: E = None
        self.w: C = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: D = None
        self.x: E = None
        self.p: F = None
        self.t: H = None
        self.u: B = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: A = None
        self.p: H = None
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: B = None
        self.v: G = None
        self.p: G = None
        self.q: F = None
        self.x: C = None
        self.y: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: A = None
        self.y: E = None
        self.w: C = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: D = None
        self.x: E = None
        self.p: F = None
        self.t: H = None
        self.u: B = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: A = None
        self.p: H = None
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: B = None
        self.v: G = None
        self.p: G = None
        self.q: F = None
        self.x: C = None
        self.y: A = None
        self.txt = txt

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

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