class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: H = None
        self.o: G = None
        self.z: B = None
        self.r: C = None
        self.v: B = None
        self.t: E = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: D = None
        self.v: B = None
        self.t: E = None
        self.o: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: A = None
        self.r: A = None
        self.q: C = None
        self.o: E = None
        self.x: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: D = None
        self.v: B = None
        self.t: E = None
        self.o: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: A = None
        self.r: A = None
        self.q: C = None
        self.o: E = None
        self.x: A = None
        self.txt = txt

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

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

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

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