class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: I = None
        self.z: D = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: B = None
        self.u: F = None
        self.x: A = None
        self.t: F = None
        self.s: H = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: H = None
        self.p: C = None
        self.u: I = None
        self.t: B = None
        self.x: I = None
        self.w: H = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: F = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: C = None
        self.p: F = None
        self.v: G = None
        self.r: E = None
        self.w: E = None
        self.t: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: B = None
        self.u: F = None
        self.x: A = None
        self.t: F = None
        self.s: H = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: H = None
        self.p: C = None
        self.u: I = None
        self.t: B = None
        self.x: I = None
        self.w: H = None
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: F = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: C = None
        self.p: F = None
        self.v: G = None
        self.r: E = None
        self.w: E = None
        self.t: E = None
        self.txt = txt

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

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

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