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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: E = None
        self.r: C = None
        self.p: E = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: A = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: H = None
        self.x: D = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: H = None
        self.p: B = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: G = None
        self.v: E = None
        self.w: F = None
        self.o: A = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: E = None
        self.r: C = None
        self.p: E = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: A = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: H = None
        self.x: D = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: H = None
        self.p: B = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: G = None
        self.v: E = None
        self.w: F = None
        self.o: A = None
        self.t: C = None
        self.txt = txt

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

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