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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: H = None
        self.q: C = None
        self.u: H = None
        self.z: E = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: B = None
        self.q: A = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: H = None
        self.q: C = None
        self.u: H = None
        self.z: E = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: B = None
        self.q: A = None
        self.s: C = None
        self.txt = txt

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

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

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