class A:
    def __init__(self, txt: str):
        self.t: J = None
        self.p: B = None
        self.r: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: J = None
        self.o: H = None
        self.z: F = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: C = None
        self.t: D = None
        self.p: A = None
        self.x: J = None
        self.z: J = None
        self.r: I = None
        self.q: B = None
        self.o: A = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: A = None
        self.w: J = None
        self.q: D = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: E = None
        self.s: D = None
        self.p: G = None
        self.x: C = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: G = None
        self.s: H = None
        self.p: G = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: J = None
        self.o: H = None
        self.z: F = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: C = None
        self.t: D = None
        self.p: A = None
        self.x: J = None
        self.z: J = None
        self.r: I = None
        self.q: B = None
        self.o: A = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: A = None
        self.w: J = None
        self.q: D = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: E = None
        self.s: D = None
        self.p: G = None
        self.x: C = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: G = None
        self.s: H = None
        self.p: G = None
        self.u: B = None
        self.txt = txt

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

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