class A:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: F = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.o: J = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: F = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: E = None
        self.u: A = None
        self.p: C = None
        self.q: J = None
        self.o: D = None
        self.x: B = None
        self.r: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: I = None
        self.w: A = None
        self.u: D = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: B = None
        self.s: C = None
        self.r: B = None
        self.z: F = None
        self.p: H = None
        self.o: F = None
        self.t: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: F = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.o: J = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: F = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: E = None
        self.u: A = None
        self.p: C = None
        self.q: J = None
        self.o: D = None
        self.x: B = None
        self.r: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: I = None
        self.w: A = None
        self.u: D = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: B = None
        self.s: C = None
        self.r: B = None
        self.z: F = None
        self.p: H = None
        self.o: F = None
        self.t: E = None
        self.txt = txt

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

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