class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: F = None
        self.v: D = None
        self.r: G = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: E = None
        self.o: A = None
        self.q: D = None
        self.y: D = None
        self.v: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: I = None
        self.x: B = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: H = None
        self.w: D = None
        self.x: E = None
        self.u: G = None
        self.v: E = None
        self.s: E = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: E = None
        self.o: A = None
        self.q: D = None
        self.y: D = None
        self.v: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: I = None
        self.x: B = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: H = None
        self.w: D = None
        self.x: E = None
        self.u: G = None
        self.v: E = None
        self.s: E = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: B = None
        self.txt = txt

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

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

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

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