class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: B = None
        self.y: E = None
        self.t: G = None
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: G = None
        self.q: B = None
        self.y: B = None
        self.z: C = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: D = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: G = None
        self.q: B = None
        self.y: B = None
        self.z: C = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: D = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: J = None
        self.txt = txt

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

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

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