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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: F = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: H = None
        self.t: I = None
        self.v: C = None
        self.x: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: G = None
        self.x: D = None
        self.t: I = None
        self.o: F = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: B = None
        self.q: C = None
        self.u: A = None
        self.x: H = None
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: F = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: H = None
        self.t: I = None
        self.v: C = None
        self.x: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: G = None
        self.x: D = None
        self.t: I = None
        self.o: F = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: B = None
        self.q: C = None
        self.u: A = None
        self.x: H = None
        self.p: D = None
        self.txt = txt

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

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