class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: D = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: D = None
        self.t: G = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: G = None
        self.s: G = None
        self.u: D = None
        self.txt = txt

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

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

l = A("l")
e = B("e")
f = C("f")
j = D("j")
m = E("m")
i = F("i")
g = G("g")
d = H("d")

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: D = None
        self.t: G = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: G = None
        self.s: G = None
        self.u: D = None
        self.txt = txt

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

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

l = A("l")
e = B("e")
f = C("f")
j = D("j")
m = E("m")
i = F("i")
g = G("g")
d = H("d")

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