class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: B = None
        self.p: I = None
        self.t: H = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: E = None
        self.q: I = None
        self.o: F = None
        self.x: A = None
        self.z: I = None
        self.y: A = None
        self.v: F = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: B = None
        self.s: H = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: E = None
        self.q: I = None
        self.o: F = None
        self.x: A = None
        self.z: I = None
        self.y: A = None
        self.v: F = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: B = None
        self.s: H = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

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

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

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

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

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