class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: D = None
        self.w: A = None
        self.v: E = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: B = None
        self.v: B = None
        self.x: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: D = None
        self.w: F = None
        self.q: D = None
        self.r: F = None
        self.x: G = None
        self.u: B = None
        self.y: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: D = None
        self.w: A = None
        self.v: E = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: B = None
        self.v: B = None
        self.x: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: D = None
        self.w: F = None
        self.q: D = None
        self.r: F = None
        self.x: G = None
        self.u: B = None
        self.y: F = None
        self.txt = txt

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

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

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