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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: H = None
        self.r: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: H = None
        self.r: H = None
        self.txt = txt

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

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

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

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

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

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

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

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