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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: D = None
        self.o: C = None
        self.z: G = None
        self.s: E = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: F = None
        self.q: A = None
        self.o: B = None
        self.x: H = None
        self.y: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: C = None
        self.x: E = None
        self.y: B = None
        self.s: B = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: D = None
        self.o: C = None
        self.z: G = None
        self.s: E = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: F = None
        self.q: A = None
        self.o: B = None
        self.x: H = None
        self.y: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: C = None
        self.x: E = None
        self.y: B = None
        self.s: B = None
        self.w: C = None
        self.txt = txt

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

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

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

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