class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: G = None
        self.r: C = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: H = None
        self.p: F = None
        self.w: F = None
        self.q: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: A = None
        self.r: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: D = None
        self.p: D = None
        self.q: I = None
        self.x: E = None
        self.s: D = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: A = None
        self.q: D = None
        self.u: E = None
        self.v: F = None
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: H = None
        self.p: F = None
        self.w: F = None
        self.q: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: A = None
        self.r: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: D = None
        self.p: D = None
        self.q: I = None
        self.x: E = None
        self.s: D = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: A = None
        self.q: D = None
        self.u: E = None
        self.v: F = None
        self.x: A = None
        self.txt = txt

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

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