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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: E = None
        self.x: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: F = None
        self.p: E = None
        self.v: A = None
        self.q: E = None
        self.o: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: E = None
        self.x: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: F = None
        self.p: E = None
        self.v: A = None
        self.q: E = None
        self.o: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: D = None
        self.txt = txt

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

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