class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: C = None
        self.v: F = None
        self.w: C = None
        self.x: H = None
        self.s: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: F = None
        self.z: B = None
        self.t: E = None
        self.o: A = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: G = None
        self.z: A = None
        self.x: A = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: B = None
        self.r: A = None
        self.o: A = None
        self.s: G = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: F = None
        self.z: B = None
        self.t: E = None
        self.o: A = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: G = None
        self.z: A = None
        self.x: A = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: B = None
        self.r: A = None
        self.o: A = None
        self.s: G = None
        self.z: C = None
        self.txt = txt

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

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

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

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