class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: C = None
        self.s: H = None
        self.x: C = None
        self.o: G = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: D = None
        self.u: I = None
        self.y: G = None
        self.w: G = None
        self.s: J = None
        self.t: A = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: I = None
        self.x: J = None
        self.o: B = None
        self.r: H = None
        self.q: H = None
        self.v: J = None
        self.u: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.o: J = None
        self.v: D = None
        self.q: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: G = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: D = None
        self.u: I = None
        self.y: G = None
        self.w: G = None
        self.s: J = None
        self.t: A = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: I = None
        self.x: J = None
        self.o: B = None
        self.r: H = None
        self.q: H = None
        self.v: J = None
        self.u: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.o: J = None
        self.v: D = None
        self.q: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: G = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: C = None
        self.txt = txt

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

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