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

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

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: A = None
        self.s: E = None
        self.u: J = None
        self.w: E = None
        self.z: C = None
        self.t: H = None
        self.y: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: I = None
        self.y: C = None
        self.q: I = None
        self.z: I = None
        self.v: D = None
        self.u: I = None
        self.x: H = None
        self.r: A = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: J = None
        self.q: F = None
        self.t: A = None
        self.w: D = None
        self.u: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: B = None
        self.t: C = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: A = None
        self.s: E = None
        self.u: J = None
        self.w: E = None
        self.z: C = None
        self.t: H = None
        self.y: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: I = None
        self.y: C = None
        self.q: I = None
        self.z: I = None
        self.v: D = None
        self.u: I = None
        self.x: H = None
        self.r: A = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: J = None
        self.q: F = None
        self.t: A = None
        self.w: D = None
        self.u: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: B = None
        self.t: C = None
        self.s: E = None
        self.txt = txt

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

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