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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: G = None
        self.o: A = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: G = None
        self.x: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: E = None
        self.u: G = None
        self.y: J = None
        self.q: E = None
        self.x: B = None
        self.o: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: H = None
        self.q: D = None
        self.txt = txt

g = A("g")
k = B("k")
f = C("f")
h = D("h")
l = E("l")
e = F("e")
j = G("j")
a = H("a")
b = I("b")
n = J("n")

g.o = k
g.u = l
g.p = a
g.r = j
k.q = h
k.u = l
f.o = j
h.x = n
h.p = j
h.u = f
h.v = a
l.z = a
l.t = a
l.v = j
l.o = g
e.r = l
e.t = j
e.x = g
j.s = l
j.u = l
j.r = g
a.w = n
a.x = b
b.z = l
b.v = l
b.q = l
b.u = j
b.y = n
b.x = k
b.o = a
n.s = j
n.p = a
n.q = h
assert j.r.o.u.z.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: E = None
        self.p: H = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: G = None
        self.o: A = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: G = None
        self.x: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: E = None
        self.u: G = None
        self.y: J = None
        self.q: E = None
        self.x: B = None
        self.o: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: H = None
        self.q: D = None
        self.txt = txt

g = A("g")
k = B("k")
f = C("f")
h = D("h")
l = E("l")
e = F("e")
j = G("j")
a = H("a")
b = I("b")
n = J("n")

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