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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: B = None
        self.x: D = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: H = None
        self.x: B = None
        self.z: E = None
        self.t: F = None
        self.v: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: D = None
        self.x: F = None
        self.s: C = None
        self.o: F = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: E = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: D = None
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: B = None
        self.x: D = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: H = None
        self.x: B = None
        self.z: E = None
        self.t: F = None
        self.v: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: D = None
        self.x: F = None
        self.s: C = None
        self.o: F = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: E = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: D = None
        self.p: B = None
        self.txt = txt

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

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