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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: B = None
        self.y: E = None
        self.w: A = None
        self.s: I = None
        self.r: C = None
        self.u: I = None
        self.z: E = None
        self.o: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: C = None
        self.y: F = None
        self.w: D = None
        self.u: B = None
        self.q: G = None
        self.s: A = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: B = None
        self.y: E = None
        self.w: A = None
        self.s: I = None
        self.r: C = None
        self.u: I = None
        self.z: E = None
        self.o: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: C = None
        self.y: F = None
        self.w: D = None
        self.u: B = None
        self.q: G = None
        self.s: A = None
        self.x: B = None
        self.txt = txt

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

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