class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: J = None
        self.r: E = None
        self.y: E = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: C = None
        self.r: E = None
        self.s: C = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: J = None
        self.r: A = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: D = None
        self.r: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: D = None
        self.z: G = None
        self.r: F = None
        self.u: A = None
        self.q: E = None
        self.v: I = None
        self.y: A = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: C = None
        self.r: E = None
        self.s: C = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: J = None
        self.r: A = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: D = None
        self.r: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: D = None
        self.z: G = None
        self.r: F = None
        self.u: A = None
        self.q: E = None
        self.v: I = None
        self.y: A = None
        self.x: C = None
        self.txt = txt

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

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