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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: F = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: I = None
        self.s: A = None
        self.r: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: H = None
        self.x: D = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: F = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: I = None
        self.s: A = None
        self.r: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: H = None
        self.x: D = None
        self.y: E = None
        self.txt = txt

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

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