class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: G = None
        self.s: F = None
        self.y: G = None
        self.p: H = None
        self.v: H = None
        self.w: D = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: I = None
        self.s: H = None
        self.q: E = None
        self.z: H = None
        self.u: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: F = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: H = None
        self.s: H = None
        self.y: A = None
        self.z: C = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: B = None
        self.u: D = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: I = None
        self.q: E = None
        self.w: G = None
        self.t: D = None
        self.o: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: I = None
        self.s: H = None
        self.q: E = None
        self.z: H = None
        self.u: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: F = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: H = None
        self.s: H = None
        self.y: A = None
        self.z: C = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: B = None
        self.u: D = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: I = None
        self.q: E = None
        self.w: G = None
        self.t: D = None
        self.o: E = None
        self.txt = txt

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

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

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