class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: I = None
        self.z: F = None
        self.u: D = None
        self.r: B = None
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: A = None
        self.r: E = None
        self.y: F = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: I = None
        self.s: B = None
        self.x: E = None
        self.w: E = None
        self.v: I = None
        self.r: B = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: D = None
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: A = None
        self.r: E = None
        self.y: F = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: I = None
        self.s: B = None
        self.x: E = None
        self.w: E = None
        self.v: I = None
        self.r: B = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: D = None
        self.y: F = None
        self.txt = txt

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

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