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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: B = None
        self.s: A = None
        self.v: D = None
        self.z: F = None
        self.q: B = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: A = None
        self.s: C = None
        self.x: A = None
        self.r: G = None
        self.o: H = None
        self.q: F = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: E = None
        self.t: G = None
        self.w: D = None
        self.p: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: C = None
        self.t: D = None
        self.v: C = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: B = None
        self.s: A = None
        self.v: D = None
        self.z: F = None
        self.q: B = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: A = None
        self.s: C = None
        self.x: A = None
        self.r: G = None
        self.o: H = None
        self.q: F = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: E = None
        self.t: G = None
        self.w: D = None
        self.p: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: C = None
        self.t: D = None
        self.v: C = None
        self.x: B = None
        self.txt = txt

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

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