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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: F = None
        self.y: A = None
        self.r: F = None
        self.z: E = None
        self.t: F = None
        self.p: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: F = None
        self.y: A = None
        self.r: F = None
        self.z: E = None
        self.t: F = None
        self.p: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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

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

f.s = j
f.u = j
f.q = c
f.r = c
f.t = e
f.v = l
f.o = h
a.s = f
a.y = f
a.v = b
a.r = b
a.t = b
a.z = l
a.p = g
c.y = i
j.y = a
j.u = l
l.p = h
l.u = i
l.t = j
b.p = f
g.z = c
g.o = h
h.w = e
h.r = f
e.q = a
i.z = c
i.o = h
assert b.p.u.y.s.s.y.txt == "a"