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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: H = None
        self.x: B = None
        self.z: I = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: B = None
        self.r: A = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: J = None
        self.p: I = None
        self.w: D = None
        self.s: C = None
        self.v: I = None
        self.y: A = None
        self.q: I = None
        self.r: I = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: F = None
        self.x: A = None
        self.s: C = None
        self.z: I = None
        self.t: B = None
        self.v: C = None
        self.q: F = None
        self.w: E = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.u: F = None
        self.y: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: H = None
        self.txt = txt

a = A("a")
l = B("l")
c = C("c")
k = D("k")
d = E("d")
g = F("g")
b = G("b")
i = H("i")
f = I("f")
h = J("h")

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: H = None
        self.x: B = None
        self.z: I = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: B = None
        self.r: A = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: J = None
        self.p: I = None
        self.w: D = None
        self.s: C = None
        self.v: I = None
        self.y: A = None
        self.q: I = None
        self.r: I = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: F = None
        self.x: A = None
        self.s: C = None
        self.z: I = None
        self.t: B = None
        self.v: C = None
        self.q: F = None
        self.w: E = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.u: F = None
        self.y: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: H = None
        self.txt = txt

a = A("a")
l = B("l")
c = C("c")
k = D("k")
d = E("d")
g = F("g")
b = G("b")
i = H("i")
f = I("f")
h = J("h")

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