class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: E = None
        self.q: J = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: D = None
        self.r: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: B = None
        self.z: H = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: C = None
        self.z: H = None
        self.p: J = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: E = None
        self.p: J = None
        self.y: J = None
        self.v: B = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: D = None
        self.r: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: B = None
        self.z: H = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: C = None
        self.z: H = None
        self.p: J = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: E = None
        self.p: J = None
        self.y: J = None
        self.v: B = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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