class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: D = None
        self.z: B = None
        self.r: I = None
        self.o: E = None
        self.v: F = None
        self.q: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: G = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: A = None
        self.r: B = None
        self.t: I = None
        self.z: G = None
        self.x: G = None
        self.y: C = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: E = None
        self.q: B = None
        self.r: A = None
        self.y: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: G = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: A = None
        self.r: B = None
        self.t: I = None
        self.z: G = None
        self.x: G = None
        self.y: C = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: E = None
        self.q: B = None
        self.r: A = None
        self.y: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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