class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: F = None
        self.y: C = None
        self.p: D = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: F = None
        self.q: E = None
        self.o: G = None
        self.x: D = None
        self.r: C = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: B = None
        self.t: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: F = None
        self.q: E = None
        self.o: G = None
        self.x: D = None
        self.r: C = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: B = None
        self.t: H = None
        self.txt = txt

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

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