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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: B = None
        self.o: E = None
        self.y: E = None
        self.q: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: E = None
        self.p: D = None
        self.z: C = None
        self.w: A = None
        self.v: C = None
        self.u: A = None
        self.q: I = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: B = None
        self.o: E = None
        self.y: E = None
        self.q: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: E = None
        self.p: D = None
        self.z: C = None
        self.w: A = None
        self.v: C = None
        self.u: A = None
        self.q: I = None
        self.txt = txt

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

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