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

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: C = None
        self.z: F = None
        self.v: H = None
        self.u: E = None
        self.p: C = None
        self.q: G = None
        self.t: G = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: D = None
        self.q: A = None
        self.t: H = None
        self.r: G = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: I = None
        self.y: E = None
        self.t: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: C = None
        self.v: A = None
        self.w: G = None
        self.r: C = None
        self.z: H = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: C = None
        self.z: F = None
        self.v: H = None
        self.u: E = None
        self.p: C = None
        self.q: G = None
        self.t: G = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: D = None
        self.q: A = None
        self.t: H = None
        self.r: G = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: I = None
        self.y: E = None
        self.t: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: C = None
        self.v: A = None
        self.w: G = None
        self.r: C = None
        self.z: H = None
        self.p: D = None
        self.txt = txt

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

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