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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: H = None
        self.t: B = None
        self.w: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: G = None
        self.x: C = None
        self.y: C = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: H = None
        self.t: B = None
        self.w: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: G = None
        self.x: C = None
        self.y: C = None
        self.p: G = None
        self.txt = txt

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

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

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