class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: D = None
        self.s: D = None
        self.u: G = None
        self.o: B = None
        self.q: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.s: D = None
        self.r: G = None
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: E = None
        self.t: I = None
        self.y: A = None
        self.p: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: D = None
        self.x: F = None
        self.v: F = None
        self.z: C = None
        self.t: D = None
        self.u: A = None
        self.p: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.s: D = None
        self.r: G = None
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: E = None
        self.t: I = None
        self.y: A = None
        self.p: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: D = None
        self.x: F = None
        self.v: F = None
        self.z: C = None
        self.t: D = None
        self.u: A = None
        self.p: E = None
        self.txt = txt

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

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

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