class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: C = None
        self.x: C = None
        self.t: C = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: D = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: H = None
        self.x: D = None
        self.v: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: E = None
        self.o: C = None
        self.r: E = None
        self.z: B = None
        self.y: H = None
        self.t: D = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: E = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: D = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: H = None
        self.x: D = None
        self.v: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: E = None
        self.o: C = None
        self.r: E = None
        self.z: B = None
        self.y: H = None
        self.t: D = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: E = None
        self.v: D = None
        self.txt = txt

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

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