class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: G = None
        self.s: F = None
        self.w: H = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: D = None
        self.y: A = None
        self.p: H = None
        self.s: F = None
        self.w: E = None
        self.t: F = None
        self.u: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: F = None
        self.p: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

g = A("g")
j = B("j")
i = C("i")
h = D("h")
l = E("l")
f = F("f")
k = G("k")
d = H("d")
c = A("c")
b = B("b")

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: D = None
        self.y: A = None
        self.p: H = None
        self.s: F = None
        self.w: E = None
        self.t: F = None
        self.u: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: F = None
        self.p: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

g = A("g")
j = B("j")
i = C("i")
h = D("h")
l = E("l")
f = F("f")
k = G("k")
d = H("d")
c = A("c")
b = B("b")

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