class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: I = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: D = None
        self.x: D = None
        self.y: I = None
        self.q: F = None
        self.s: I = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: G = None
        self.s: A = None
        self.z: B = None
        self.p: E = None
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: G = None
        self.y: I = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: H = None
        self.q: A = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: G = None
        self.r: C = None
        self.y: B = None
        self.w: G = None
        self.s: D = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: F = None
        self.w: A = None
        self.s: G = None
        self.v: F = None
        self.r: D = None
        self.x: G = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: D = None
        self.x: D = None
        self.y: I = None
        self.q: F = None
        self.s: I = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: G = None
        self.s: A = None
        self.z: B = None
        self.p: E = None
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: G = None
        self.y: I = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: H = None
        self.q: A = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: G = None
        self.r: C = None
        self.y: B = None
        self.w: G = None
        self.s: D = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: F = None
        self.w: A = None
        self.s: G = None
        self.v: F = None
        self.r: D = None
        self.x: G = None
        self.p: A = None
        self.txt = txt

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

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