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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: H = None
        self.z: E = None
        self.s: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: F = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: C = None
        self.v: G = None
        self.o: G = None
        self.x: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: H = None
        self.z: E = None
        self.s: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: F = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: C = None
        self.v: G = None
        self.o: G = None
        self.x: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: I = None
        self.txt = txt

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

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