class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: D = None
        self.w: D = None
        self.r: H = None
        self.x: F = None
        self.u: B = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: F = None
        self.v: D = None
        self.w: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: C = None
        self.u: F = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: G = None
        self.p: C = None
        self.z: A = None
        self.w: C = None
        self.t: E = None
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: G = None
        self.r: E = None
        self.o: F = None
        self.q: F = None
        self.t: D = None
        self.s: E = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: F = None
        self.v: D = None
        self.w: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: C = None
        self.u: F = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: G = None
        self.p: C = None
        self.z: A = None
        self.w: C = None
        self.t: E = None
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: G = None
        self.r: E = None
        self.o: F = None
        self.q: F = None
        self.t: D = None
        self.s: E = None
        self.x: B = None
        self.txt = txt

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

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