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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: B = None
        self.q: C = None
        self.v: G = None
        self.r: H = None
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: B = None
        self.q: C = None
        self.v: G = None
        self.r: H = None
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

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

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

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