class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: C = None
        self.o: E = None
        self.z: C = None
        self.q: H = None
        self.v: G = None
        self.t: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: G = None
        self.z: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: G = None
        self.z: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: C = None
        self.txt = txt

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

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