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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: D = None
        self.s: B = None
        self.z: H = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: D = None
        self.q: I = None
        self.s: A = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: G = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: B = None
        self.w: C = None
        self.txt = txt

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

h.p = i
h.x = b
h.q = b
h.w = j
h.u = j
h.s = m
h.y = m
h.o = f
j.x = f
j.p = i
j.s = m
j.r = g
f.v = h
f.u = b
f.y = b
f.s = j
f.z = e
b.z = m
g.p = c
g.w = b
g.q = m
g.s = h
g.y = f
c.o = i
i.o = f
i.r = b
e.p = g
e.o = i
e.u = b
m.q = i
m.x = j
m.w = f
n.p = c
n.w = b
n.q = m
n.s = h
n.y = f
assert e.u.z.x.txt == "
class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: D = None
        self.w: B = None
        self.s: I = None
        self.y: I = None
        self.o: C = None
        self.q: D = None
        self.u: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: D = None
        self.s: B = None
        self.z: H = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: D = None
        self.q: I = None
        self.s: A = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: G = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: B = None
        self.w: C = None
        self.txt = txt

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

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