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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: A = None
        self.s: A = None
        self.o: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: E = None
        self.w: E = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: E = None
        self.u: F = None
        self.s: B = None
        self.txt = txt

k = A("k")
i = B("i")
f = C("f")
d = D("d")
a = E("a")
m = F("m")
c = G("c")
j = H("j")
g = H("g")

k.w = m
i.u = j
i.t = k
i.s = k
i.o = g
f.s = c
f.y = a
f.w = a
f.o = a
d.x = m
a.u = m
m.s = c
m.y = a
m.p = g
m.r = g
m.w = g
m.v = f
m.u = j
c.y = i
j.o = k
j.q = a
j.u = m
j.s = i
g.o = k
g.q = a
g.u = m
g.s = i
assert j.s.s.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: A = None
        self.s: A = None
        self.o: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: E = None
        self.w: E = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: E = None
        self.u: F = None
        self.s: B = None
        self.txt = txt

k = A("k")
i = B("i")
f = C("f")
d = D("d")
a = E("a")
m = F("m")
c = G("c")
j = H("j")
g = H("g")

k.w = m
i.u = j
i.t = k
i.s = k
i.o = g
f.s = c
f.y = a
f.w = a
f.o = a
d.x = m
a.u = m
m.s = c
m.y = a
m.p = g
m.r = g
m.w = g
m.v = f
m.u = j
c.y = i
j.o = k
j.q = a
j.u = m
j.s = i
g.o = k
g.q = a
g.u = m
g.s = i
assert j.s.s.w.u.txt == "j"