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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: J = None
        self.s: H = None
        self.z: H = None
        self.p: D = None
        self.u: H = None
        self.y: G = None
        self.o: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: D = None
        self.p: E = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: E = None
        self.p: B = None
        self.o: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: J = None
        self.s: H = None
        self.z: H = None
        self.p: D = None
        self.u: H = None
        self.y: G = None
        self.o: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: D = None
        self.p: E = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: E = None
        self.p: B = None
        self.o: F = None
        self.txt = txt

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

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

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

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