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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: B = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: B = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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