class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: F = None
        self.s: E = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: F = None
        self.y: E = None
        self.r: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: A = None
        self.x: F = None
        self.v: D = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: G = None
        self.x: D = None
        self.s: A = None
        self.r: G = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: I = None
        self.p: I = None
        self.y: D = None
        self.r: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: D = None
        self.p: B = None
        self.o: E = None
        self.w: F = None
        self.txt = txt

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

b.v = h
b.y = i
b.o = i
b.s = e
d.u = b
d.r = b
d.p = i
d.y = e
j.p = i
l.w = c
l.v = i
e.p = c
e.z = b
e.s = b
e.x = i
e.v = l
i.p = b
i.s = b
i.w = h
i.r = h
i.x = l
i.u = j
h.u = c
h.w = c
h.p = c
h.r = c
h.y = l
m.u = h
m.z = l
c.s = b
c.z = l
c.p = d
c.o = e
c.w = i
assert m.z.w.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: F = None
        self.s: E = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: F = None
        self.y: E = None
        self.r: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: A = None
        self.x: F = None
        self.v: D = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: G = None
        self.x: D = None
        self.s: A = None
        self.r: G = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: I = None
        self.p: I = None
        self.y: D = None
        self.r: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: D = None
        self.p: B = None
        self.o: E = None
        self.w: F = None
        self.txt = txt

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

b.v = h
b.y = i
b.o = i
b.s = e
d.u = b
d.r = b
d.p = i
d.y = e
j.p = i
l.w = c
l.v = i
e.p = c
e.z = b
e.s = b
e.x = i
e.v = l
i.p = b
i.s = b
i.w = h
i.r = h
i.x = l
i.u = j
h.u = c
h.w = c
h.p = c
h.r = c
h.y = l
m.u = h
m.z = l
c.s = b
c.z = l
c.p = d
c.o = e
c.w = i
assert m.z.w.o.txt == "e"