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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: A = None
        self.q: I = None
        self.y: F = None
        self.s: B = None
        self.w: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: H = None
        self.v: H = None
        self.z: H = None
        self.t: G = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: B = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: A = None
        self.q: I = None
        self.y: F = None
        self.s: B = None
        self.w: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: H = None
        self.v: H = None
        self.z: H = None
        self.t: G = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: B = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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