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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: E = None
        self.q: D = None
        self.v: H = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: F = None
        self.u: A = None
        self.z: E = None
        self.t: G = None
        self.q: F = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: E = None
        self.q: D = None
        self.v: H = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: F = None
        self.u: A = None
        self.z: E = None
        self.t: G = None
        self.q: F = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: E = None
        self.txt = txt

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

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

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

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