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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: B = None
        self.w: A = None
        self.u: D = None
        self.x: I = None
        self.y: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: D = None
        self.r: I = None
        self.s: D = None
        self.u: E = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: H = None
        self.r: F = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: G = None
        self.o: G = None
        self.q: D = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: B = None
        self.w: A = None
        self.u: D = None
        self.x: I = None
        self.y: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: D = None
        self.r: I = None
        self.s: D = None
        self.u: E = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: H = None
        self.r: F = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: G = None
        self.o: G = None
        self.q: D = None
        self.p: D = None
        self.txt = txt

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

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

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