class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: I = None
        self.p: G = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: G = None
        self.w: B = None
        self.q: B = None
        self.s: I = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: E = None
        self.u: E = None
        self.r: I = None
        self.s: I = None
        self.x: F = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: I = None
        self.p: G = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: I = None
        self.p: G = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: G = None
        self.w: B = None
        self.q: B = None
        self.s: I = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: E = None
        self.u: E = None
        self.r: I = None
        self.s: I = None
        self.x: F = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: I = None
        self.p: G = None
        self.v: E = None
        self.txt = txt

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

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

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