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

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: D = None
        self.o: B = None
        self.t: B = None
        self.u: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: G = None
        self.u: F = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: J = None
        self.v: G = None
        self.o: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: H = None
        self.o: E = None
        self.x: F = None
        self.q: B = None
        self.w: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: D = None
        self.o: B = None
        self.t: B = None
        self.u: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: G = None
        self.u: F = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: J = None
        self.v: G = None
        self.o: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: H = None
        self.o: E = None
        self.x: F = None
        self.q: B = None
        self.w: B = None
        self.txt = txt

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

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