class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: D = None
        self.v: E = None
        self.o: H = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: H = None
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: I = None
        self.r: A = None
        self.x: A = None
        self.o: H = None
        self.t: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: A = None
        self.s: B = None
        self.w: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: H = None
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: I = None
        self.r: A = None
        self.x: A = None
        self.o: H = None
        self.t: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: A = None
        self.s: B = None
        self.w: H = None
        self.txt = txt

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

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