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

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

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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